package com.cls.system.mapper;

import com.cls.system.entity.Template;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 模板管理 Mapper
 *
 * @author slx
 * @date 2020-11-24 15:33:34
 */
@Repository
public interface TemplateMapper extends BaseMapper<Template> {

    List<Template> findPage(@Param("template")Template template);

    @Select("SELECT * FROM sys_template WHERE template_type_code=#{templateTypeCode} and is_delete=0 limit 1 ")
    Template findByTemplateTypeCode(@Param("templateTypeCode") String templateTypeCode);

}
